open Ast

let print_pos = function
	| { pfile = file ; pmin = min ; pmax = max } -> print_string ( "in " ^ file ^ " from " ^ (string_of_int min) ^ " to " ^ (string_of_int max) )


let rec print_binop = function 
	| OpAdd -> print_string "OpAdd"
	| OpMult -> print_string "OpMult"
	| OpDiv -> print_string "OpDiv"
	| OpSub -> print_string "OpSub"
	| OpAssign -> print_string "OpAssign"
	| OpEq -> print_string "OpEq"
	| OpNotEq -> print_string "OpNotEq"
	| OpGt -> print_string "OpGt"
	| OpGte -> print_string "OpGte"
	| OpLt -> print_string "OpLt"
	| OpLte -> print_string "OpLte"
	| OpAnd -> print_string "OpAnd"
	| OpOr -> print_string "OpOr"
	| OpXor -> print_string "OpXor"
	| OpBoolAnd -> print_string "OpBoolAnd"
	| OpBoolOr -> print_string "OpBoolOr"
	| OpShl -> print_string "Shl"
	| OpShr -> print_string "Shr"
	| OpUShr -> print_string "UShr"
	| OpMod -> print_string "OpMod"
	| OpAssignOp ( bi ) -> print_string "OpAssignOp -> " ; print_binop bi
	| OpInterval -> print_string "OpInterval" 

let print_unop = function
	| Increment -> print_string "Increment"
	| Decrement -> print_string "Decrement"
	| Not -> print_string "Not"
	| Neg -> print_string "Neg"
	| NegBits -> print_string "NegBits" 

and print_unop_flag = function
	| Prefix -> print_string "Prefix"
	| Postfix -> print_string "Postfix" 

and print_while_flag = function
	| NormalWhile -> print_string "NormalWhile"
	| DoWhile -> print_string "DoWhile" 
		
